import { checkPermission } from "../utils/common";
export default {
    mounted(el, binding) {
        let permission = binding.value; // 获取到 v-permission的值
        if (permission) {
            let hasPermission = checkPermission(permission);
            if (!hasPermission) {
                // 没有权限 移除Dom元素
                el.parentNode && el.parentNode.removeChild(el);
            }
        }
    },
}